{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "6455b906",
   "metadata": {},
   "source": [
    "## 导入所需的包"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "38a3e5db",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T06:32:52.446554Z",
     "start_time": "2021-10-18T06:32:52.049180Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\u001b[33mcommit c1d3c3fb2669f6eb3613de6753048a784adb4d51\u001b[m\u001b[33m (\u001b[m\u001b[1;36mHEAD -> \u001b[m\u001b[1;32mmaster\u001b[m\u001b[33m, \u001b[m\u001b[1;31morigin/master\u001b[m\u001b[33m, \u001b[m\u001b[1;31morigin/HEAD\u001b[m\u001b[33m)\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Oct 18 09:10:36 2021 +0800\r\n",
      "\r\n",
      "    regressor, 增加metric配置.\r\n",
      "\r\n",
      "\u001b[33mcommit 96fb99defa13a3f379a56220984995a84c07fadb\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Oct 18 08:38:59 2021 +0800\r\n",
      "\r\n",
      "    优化pipeline, 特征合并.\r\n",
      "\r\n",
      "\u001b[33mcommit 39373c28489f349937c8b0c56cc3825dcc885f83\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Oct 18 08:30:27 2021 +0800\r\n",
      "\r\n",
      "    更新pipeline.\r\n",
      "\r\n",
      "\u001b[33mcommit b2637e3039460d09224abd0d9e7ec129be625965\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Oct 17 13:50:59 2021 +0800\r\n",
      "\r\n",
      "    add case: Allstate.\r\n",
      "\r\n",
      "\u001b[33mcommit 2f39a6de3d26508ac694db8ddfe38d5a70da414f\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Oct 17 10:44:58 2021 +0800\r\n",
      "\r\n",
      "    debug feature: fe_time.\r\n",
      "\r\n",
      "\u001b[33mcommit 6c07c52fd8aad4cc83e8eb5acebe6df2954e3189\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Oct 17 10:43:48 2021 +0800\r\n",
      "\r\n",
      "    debug, fe_time.\r\n",
      "\r\n",
      "\u001b[33mcommit c63350a2ed12c0018df3e03bb6f03d15654e9982\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Oct 17 10:39:56 2021 +0800\r\n",
      "\r\n",
      "    add feature: fe_time.\r\n",
      "\r\n",
      "\u001b[33mcommit 9237f8571dae8f221d9ea31e27b40a1d58de8cf5\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Oct 17 10:28:03 2021 +0800\r\n",
      "\r\n",
      "    debug.\r\n",
      "\r\n",
      "\u001b[33mcommit 83cec4c0a6eb8377076ac351e4704dc29feeff55\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Oct 17 10:24:01 2021 +0800\r\n",
      "\r\n",
      "    debug datetime feature type.\r\n",
      "\r\n",
      "\u001b[33mcommit 926144780b3966e039e165096427f3c413ff8c0e\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Oct 17 10:21:07 2021 +0800\r\n",
      "\r\n",
      "    debug detect datetime feature type.\r\n",
      "\r\n",
      "\u001b[33mcommit 74abc938221fd49d313ffd5cb66318d2cbe154af\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sat Oct 16 21:29:51 2021 +0800\r\n",
      "\r\n",
      "    debug.\r\n",
      "\r\n",
      "\u001b[33mcommit 21f25e9a66a05caac6ebeb3ae9314a88edd9116a\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sat Oct 16 18:00:42 2021 +0800\r\n",
      "\r\n",
      "    重命名1-1拼表特征的列名\r\n",
      "\r\n",
      "\u001b[33mcommit 0c1cf483685645f6ceeea03fe1f6701cffa4850e\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sat Oct 16 08:18:18 2021 +0800\r\n",
      "\r\n",
      "    add grocery_sales results and demos.\r\n",
      "\r\n",
      "\u001b[33mcommit bb8deaa13fbd261e8dc98f04dc2574b05b985bcb\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Oct 8 20:07:45 2021 +0800\r\n",
      "\r\n",
      "    增加ventilator和Santander上分点总结；更新ventilator结果；\r\n",
      "\r\n",
      "\u001b[33mcommit de84f292155bce87fe44469502ba9263de934be1\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Sep 30 08:20:04 2021 +0800\r\n",
      "\r\n",
      "    优化diff和shift特征\r\n",
      "\r\n",
      "\u001b[33mcommit 50ab24fbcff59134d874e461652b92f60aa402d0\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Sep 30 08:19:38 2021 +0800\r\n",
      "\r\n",
      "    add cumsum feature\r\n",
      "\r\n",
      "\u001b[33mcommit 91f4e68e545fc91284219855cffc2e7c679ce087\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Sep 29 20:44:05 2021 +0800\r\n",
      "\r\n",
      "    debug for denoising autoencoder.\r\n",
      "\r\n",
      "\u001b[33mcommit d9870fb170c6f837818ff406d13fe25634d44a8a\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Sep 29 20:33:36 2021 +0800\r\n",
      "\r\n",
      "    add shift feature; add diff featuers; add ventilator demos.\r\n",
      "\r\n",
      "\u001b[33mcommit 70a9128f32a988454c49651716b7afbd109fa929\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 24 19:51:55 2021 +0800\r\n",
      "\r\n",
      "    updata santander result.\r\n",
      "\r\n",
      "\u001b[33mcommit db903d295e59e38c749ac45381347561caf40545\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 24 17:18:50 2021 +0800\r\n",
      "\r\n",
      "    init FeatureDenoisingAutoencoder.\r\n",
      "\r\n",
      "\u001b[33mcommit 08cc35212f2e0d463724cc6b27597253f1329105\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 24 17:13:57 2021 +0800\r\n",
      "\r\n",
      "    denoising autoencoder特征.\r\n",
      "\r\n",
      "\u001b[33mcommit 410ef74d5756873d890caa07274b8ee0e1d746c5\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Sep 23 16:58:48 2021 +0800\r\n",
      "\r\n",
      "    modify README.md; add stumbleupon demo.\r\n",
      "\r\n",
      "\u001b[33mcommit 755a5bc45c760238e6e4309f1985959a4c5364b1\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Sep 22 11:37:03 2021 +0800\r\n",
      "\r\n",
      "    全流程中加入nlp特征; 增加stumbleupon的demo.\r\n",
      "\r\n",
      "\u001b[33mcommit 4d39f318551660fe139878a5c88db1d3aaac0b97\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 17 20:53:19 2021 +0800\r\n",
      "\r\n",
      "    一键执行逻辑中增加nlp特征.\r\n",
      "\r\n",
      "\u001b[33mcommit 55f67716c7a50366d45249c0f9d3ea4166c13c41\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 17 20:48:51 2021 +0800\r\n",
      "\r\n",
      "    1. 增加nlp特征; 2. 增加StumbleUpon案例结果.\r\n",
      "\r\n",
      "\u001b[33mcommit 74f9d849c0eadde63ff71ec5a79631d3af08fd7b\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 17 16:05:38 2021 +0800\r\n",
      "\r\n",
      "    增加文本类型.\r\n",
      "\r\n",
      "\u001b[33mcommit e45f0b7c3855514177328519b574e7b969812ce4\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Sep 15 11:08:54 2021 +0800\r\n",
      "\r\n",
      "    modify README.md\r\n",
      "\r\n",
      "\u001b[33mcommit 7d4b34cc7cc584b7643d17b7c0bca7c8f92dbf7b\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Sep 14 17:19:09 2021 +0800\r\n",
      "\r\n",
      "    debug: 分解特征.\r\n",
      "\r\n",
      "\u001b[33mcommit 77bc1761c50bda21fce5bc21fff4115dd3d11443\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Sep 14 16:08:56 2021 +0800\r\n",
      "\r\n",
      "    init FeatureDimensionReduction.\r\n",
      "\r\n",
      "\u001b[33mcommit f8f277e7b8cd314127bb622484855fe8aac78cf5\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Sep 14 15:37:52 2021 +0800\r\n",
      "\r\n",
      "    降维特征.\r\n",
      "\r\n",
      "\u001b[33mcommit f56b86583be17aac48f69067644bec8bf624b57b\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Sep 14 11:26:25 2021 +0800\r\n",
      "\r\n",
      "    debug: xbg二分类模型改成预测概率而非硬分类.\r\n",
      "\r\n",
      "\u001b[33mcommit ff8c20b9742ad36c31ab5baec8c1f1211c61e8bf\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Sep 14 10:49:10 2021 +0800\r\n",
      "\r\n",
      "    add demo: kaggle springleaf\r\n",
      "\r\n",
      "\u001b[33mcommit ac4dcab227d8bcc17ecc2d69e5e0486a5f13d5f7\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Sep 14 10:37:49 2021 +0800\r\n",
      "\r\n",
      "    modify README.md: 更新springleaf一键执行结果.\r\n",
      "\r\n",
      "\u001b[33mcommit 26eb6bea33b8e8428ee1afcd4403ccae2948724e\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 10 19:10:12 2021 +0800\r\n",
      "\r\n",
      "    debug: task_type\r\n",
      "\r\n",
      "\u001b[33mcommit 58820caad3acc6d2b1fae7a81e051d3fb30f13d3\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 10 14:35:18 2021 +0800\r\n",
      "\r\n",
      "    优化log\r\n",
      "\r\n",
      "\u001b[33mcommit 51704abfd80114578eab318356cc77b1ef46e18b\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Sep 10 14:30:35 2021 +0800\r\n",
      "\r\n",
      "    1. 增加case: kaggle springleaf;\r\n",
      "    2. 优化autox get_submit逻辑\r\n",
      "\r\n",
      "\u001b[33mcommit 6455e62326d344b33a37f100b4fecf2dcb637c8a\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Sep 2 16:50:56 2021 +0800\r\n",
      "\r\n",
      "    增加ieee结果和pipeline demo.\r\n",
      "\r\n",
      "\u001b[33mcommit 74d679c47ae2e0639d02b994e6cf1f6f84dfe560\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Sep 2 15:44:15 2021 +0800\r\n",
      "\r\n",
      "    debug for feature_filter.\r\n",
      "\r\n",
      "\u001b[33mcommit 75c9510e049cfdbaa57f07b3f4306f1a161fccea\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Sep 2 14:48:42 2021 +0800\r\n",
      "\r\n",
      "    优化groupby key筛选条件.\r\n",
      "\r\n",
      "\u001b[33mcommit ff2bb3fb04a5b84feca94b26de7ac6048cc36c7b\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Sep 1 17:37:03 2021 +0800\r\n",
      "\r\n",
      "    debug: fe_rank\r\n",
      "\r\n",
      "\u001b[33mcommit 1fe1f1732606a5dbf007270c2dbae1711b5a72b6\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Sep 1 16:27:16 2021 +0800\r\n",
      "\r\n",
      "    debug: 拼接1-1简单表.\r\n",
      "\r\n",
      "\u001b[33mcommit c7b7964fb2713118d6e85d0ef22a384f924143be\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Sep 1 16:04:23 2021 +0800\r\n",
      "\r\n",
      "    增加功能，拼接1-1简单表;\r\n",
      "    kaggle_ieee, demo;\r\n",
      "    modify README.md.\r\n",
      "\r\n",
      "\u001b[33mcommit 21457fafb8d01644cfc668d0aab8d463a8cda3e7\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 31 15:45:24 2021 +0800\r\n",
      "\r\n",
      "    modify README\r\n",
      "\r\n",
      "\u001b[33mcommit 2c2cf54574a8a9c6c21f5452ed5f5bcf4b3ae7ef\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 31 15:25:09 2021 +0800\r\n",
      "\r\n",
      "    modify README_EN.md\r\n",
      "\r\n",
      "\u001b[33mcommit 3da3ba229d78d81d844226c0d584d1da6572109a\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 30 20:34:13 2021 +0800\r\n",
      "\r\n",
      "    init Fe_rank.\r\n",
      "\r\n",
      "\u001b[33mcommit 7f2e3717b84ebdd223037ce2ac63740d46571a9a\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 30 17:32:12 2021 +0800\r\n",
      "\r\n",
      "    add rank feature.\r\n",
      "\r\n",
      "\u001b[33mcommit b3fa6719c0052b964f0d74a6bf9a8941c488d915\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 30 10:43:40 2021 +0800\r\n",
      "\r\n",
      "    add demo: kaggle house price.\r\n",
      "\r\n",
      "\u001b[33mcommit 59b7d261d059f84a291fda6013f7eeffdcae9987\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Aug 29 08:03:49 2021 +0800\r\n",
      "\r\n",
      "    modify README_EN.md, 跳转链接.\r\n",
      "\r\n",
      "\u001b[33mcommit f2581a891bc919b3c0f11fb4c7cf700ecedc2f73\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Aug 29 07:57:44 2021 +0800\r\n",
      "\r\n",
      "    modify README_EN.md\r\n",
      "\r\n",
      "\u001b[33mcommit 50b186979fa431cdfaed38a508f1a134d2e7e0f1\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 27 17:44:44 2021 +0800\r\n",
      "\r\n",
      "    modify README.md, 新增kaggle house price数据集.\r\n",
      "\r\n",
      "\u001b[33mcommit 08e2dc8e069ffdd5f5dea5870af971d7b2cbe1df\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 27 16:39:01 2021 +0800\r\n",
      "\r\n",
      "    install_requires, 忽略tabnet.\r\n",
      "\r\n",
      "\u001b[33mcommit 89611b6d10d4492cde5b6f390d2c4077977b66f1\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 27 15:52:55 2021 +0800\r\n",
      "\r\n",
      "    xgb打印轮次设置为100\r\n",
      "\r\n",
      "\u001b[33mcommit 984d81a49150edd80d177137ceb748591db1a04d\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 27 15:42:14 2021 +0800\r\n",
      "\r\n",
      "    回归模型调参,修改验证集切分方式.\r\n",
      "\r\n",
      "\u001b[33mcommit 7fb12ebf09d04b0a617896ab1a63474fc8bb55a5\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 27 15:09:13 2021 +0800\r\n",
      "\r\n",
      "    优化特征类型识别.\r\n",
      "\r\n",
      "\u001b[33mcommit 39f94e1e4cd82c6d148556d80bb47146bfc8d539\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 27 14:58:53 2021 +0800\r\n",
      "\r\n",
      "    优化特征类型识别.\r\n",
      "\r\n",
      "\u001b[33mcommit 9f78099656c32f335a9134ea6358f131891699f0\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 26 17:02:52 2021 +0800\r\n",
      "\r\n",
      "    modify readme.\r\n",
      "\r\n",
      "\u001b[33mcommit 656c91218b289fe61cf21855e16b6895acec2c78\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 24 15:21:30 2021 +0800\r\n",
      "\r\n",
      "    优化readme,增加zhidemai比赛上分点总结\r\n",
      "\r\n",
      "\u001b[33mcommit 0aa3748f2a06d3639f6afeb94e33bca7d0bdeea8\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 20 14:33:54 2021 +0800\r\n",
      "\r\n",
      "    modify README.md\r\n",
      "\r\n",
      "\u001b[33mcommit 0cfd6d5cf86fee9b1a02b79a94ffd97c0b8a166a\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 19 20:14:02 2021 +0800\r\n",
      "\r\n",
      "    setup安装包增加tabnet.\r\n",
      "\r\n",
      "\u001b[33mcommit 84af1a14acd1e121bfcae1afde06f00b80df614d\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Aug 18 11:52:08 2021 +0800\r\n",
      "\r\n",
      "    debug: tabnet的调参参数配置\r\n",
      "\r\n",
      "\u001b[33mcommit d185a546260127b5faffab105d3a2c0eaafb69bc\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 21:19:57 2021 +0800\r\n",
      "\r\n",
      "    tabnet, reshape y\r\n",
      "\r\n",
      "\u001b[33mcommit 388c00372b8f4af10bed4212ccc1bdf6e3f54275\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 21:01:59 2021 +0800\r\n",
      "\r\n",
      "    debug, tabnet.\r\n",
      "\r\n",
      "\u001b[33mcommit 18bc69af5802750f5ec23312e7ab649ddc25cfa8\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 20:25:31 2021 +0800\r\n",
      "\r\n",
      "    tabnet: 缺失值用中位数填充.\r\n",
      "\r\n",
      "\u001b[33mcommit 5a88c0ff98338dddb8d1406eb1bfd0d2a72f2121\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 19:37:39 2021 +0800\r\n",
      "\r\n",
      "    优化tabnet\r\n",
      "\r\n",
      "\u001b[33mcommit 1e07509db81c4c6e3222ae6697ef5c119a2eef31\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 16:08:43 2021 +0800\r\n",
      "\r\n",
      "    bagging中增加tabnet模型\r\n",
      "\r\n",
      "\u001b[33mcommit fbed7f9fb73e4a9ac143398902fd042a6fa54247\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 16:05:36 2021 +0800\r\n",
      "\r\n",
      "    tabnet regressor\r\n",
      "\r\n",
      "\u001b[33mcommit 8e89749c53b5ebddc86cb9b8ace762f7b3854841\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 15:21:32 2021 +0800\r\n",
      "\r\n",
      "    debug模式下缩短调参时间。\r\n",
      "\r\n",
      "\u001b[33mcommit 9c70574e38194766cbecca0822b2cdd48867144b\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 15:13:04 2021 +0800\r\n",
      "\r\n",
      "    debug模型打印日志.\r\n",
      "\r\n",
      "\u001b[33mcommit 7b18599f132699f056470761701968931da3f7a9\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Tue Aug 17 15:04:15 2021 +0800\r\n",
      "\r\n",
      "    增加debug模式，方便快速调试.\r\n",
      "\r\n",
      "\u001b[33mcommit d2d332b0bb5432e0ef49df01455c81a2644e7271\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 16 08:00:11 2021 +0800\r\n",
      "\r\n",
      "    auto_label_encoder,设置silence_cols\r\n",
      "\r\n",
      "\u001b[33mcommit 1b8ced5337d1826ff6dadec235c8cc5a00cb4e89\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sun Aug 15 08:42:35 2021 +0800\r\n",
      "\r\n",
      "    内存优化.\r\n",
      "\r\n",
      "\u001b[33mcommit fab33ba59407c96ac146c4ad6865a32f06b8fa34\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Aug 11 10:53:16 2021 +0800\r\n",
      "\r\n",
      "    增加二分类模型.\r\n",
      "\r\n",
      "\u001b[33mcommit 373c58eb950fbc364581d75b493ecaa1735079ed\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 9 15:28:00 2021 +0800\r\n",
      "\r\n",
      "    识别任务类型\r\n",
      "\r\n",
      "\u001b[33mcommit 44755fa33a1a6f59239786ab80de9d521c72b68c\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 6 16:19:49 2021 +0800\r\n",
      "\r\n",
      "    lgb, Verbose = 100\r\n",
      "\r\n",
      "\u001b[33mcommit e18d2dd86b63d4e253b3ad67017aeb82546cead3\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 6 13:21:03 2021 +0800\r\n",
      "\r\n",
      "    优化CrossXgbRegression.\r\n",
      "\r\n",
      "\u001b[33mcommit 6264775e9faec6d832cdb59819bca6534ced7401\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 6 11:41:03 2021 +0800\r\n",
      "\r\n",
      "    优化CrossXgbRegression: X进行StandardScaler, debug.\r\n",
      "\r\n",
      "\u001b[33mcommit 53135e94a4a0a0b079bf83df3db8e687e5ce0dc5\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 6 11:20:31 2021 +0800\r\n",
      "\r\n",
      "    优化CrossXgbRegression: X进行StandardScaler\r\n",
      "\r\n",
      "\u001b[33mcommit f0ac9242246a87dcee3e660c971cc33c5246f0bb\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Fri Aug 6 10:38:23 2021 +0800\r\n",
      "\r\n",
      "    优化CrossXgbRegression\r\n",
      "\r\n",
      "\u001b[33mcommit 75156d600497bb0910a8026aa87b2e7dc964ba79\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 22:34:31 2021 +0800\r\n",
      "\r\n",
      "    xgb model: tree_method='gpu_hist'\r\n",
      "\r\n",
      "\u001b[33mcommit afb229aa554f632badee1a171c28c991968eb331\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 20:58:11 2021 +0800\r\n",
      "\r\n",
      "    模型部分使用xgb和lgb融合\r\n",
      "\r\n",
      "\u001b[33mcommit 338ee3069d797cc10fe6d0f8a38afdc308cfdc71\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 20:29:23 2021 +0800\r\n",
      "\r\n",
      "    del temp.py\r\n",
      "\r\n",
      "\u001b[33mcommit c0dbe0887b53f7e8f02a6a3e9bcde803059ae973\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 19:53:05 2021 +0800\r\n",
      "\r\n",
      "    debug: X.iloc\r\n",
      "\r\n",
      "\u001b[33mcommit 2b806aedc6a2086268b1dadac4111ef1b1b1d83b\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 19:23:17 2021 +0800\r\n",
      "\r\n",
      "    debug: xgb regressor\r\n",
      "\r\n",
      "\u001b[33mcommit 5afbd56bdfb29e33d52d908a03c85508ad4e3d08\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 17:13:38 2021 +0800\r\n",
      "\r\n",
      "    xgboost不使用gpu_hist\r\n",
      "\r\n",
      "\u001b[33mcommit 1c56af83e7f90ec4fcc594fd87dcd0f6b9abaf8c\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 17:10:11 2021 +0800\r\n",
      "\r\n",
      "    xgboost不使用gpu\r\n",
      "\r\n",
      "\u001b[33mcommit b25c37c96115d5845841df1781eabbf4345af621\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 16:55:16 2021 +0800\r\n",
      "\r\n",
      "    增加xgb模型.\r\n",
      "\r\n",
      "\u001b[33mcommit 9af12e41e9a0a3295e63a0fe17988261e63050ee\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Aug 5 11:02:14 2021 +0800\r\n",
      "\r\n",
      "    get_submit, 优化模型训练部分\r\n",
      "\r\n",
      "\u001b[33mcommit d127c4e4a9b17f0244ec14af11482db60c261d21\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Aug 4 16:29:34 2021 +0800\r\n",
      "\r\n",
      "    debug: log输出.\r\n",
      "\r\n",
      "\u001b[33mcommit 3178f49c0ae81f5d9ba084d5dad1563804f457a4\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Aug 4 15:24:57 2021 +0800\r\n",
      "\r\n",
      "    增加模型调参功能.\r\n",
      "\r\n",
      "\u001b[33mcommit eb97b2420853e8e0fddd55343c6029ee6da8b4b3\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Wed Aug 4 15:02:27 2021 +0800\r\n",
      "\r\n",
      "    debug: concat_train_test操作在自动特征类型识别之后.\r\n",
      "\r\n",
      "\u001b[33mcommit 3452d8831ebe8d33f717ad16452109680aa8ef1f\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 2 20:00:16 2021 +0800\r\n",
      "\r\n",
      "    调整target encoding的阈值.\r\n",
      "\r\n",
      "\u001b[33mcommit 0d66de573edd6485725d603620c1344bf41e6222\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 2 19:48:30 2021 +0800\r\n",
      "\r\n",
      "    debug:del_targetencoding_cols去重.\r\n",
      "\r\n",
      "\u001b[33mcommit dc4df8ef3a70a0532578ee6e043223e1f219b60d\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 2 19:45:35 2021 +0800\r\n",
      "\r\n",
      "    debug: del_targetencoding_cols去重.\r\n",
      "\r\n",
      "\u001b[33mcommit 4ecb985b6d6b46145743338c2ed3bd28e3f7977f\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 2 19:34:08 2021 +0800\r\n",
      "\r\n",
      "    debug.\r\n",
      "\r\n",
      "\u001b[33mcommit a156ca854d341072d23df29623f82c819e5c5b81\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Aug 2 19:31:32 2021 +0800\r\n",
      "\r\n",
      "    target encoding特征筛选：test做了target encoding之后，有值的部分要大于90%\r\n",
      "\r\n",
      "\u001b[33mcommit ba93d457a017bb65bf3dc8d4676cea232a48c88c\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Jul 26 17:36:55 2021 +0800\r\n",
      "\r\n",
      "    内存优化, 优化log.\r\n",
      "\r\n",
      "\u001b[33mcommit 5cda17ae252012184192ba10ba941b7eabd1946d\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Jul 26 17:31:49 2021 +0800\r\n",
      "\r\n",
      "    内存优化.\r\n",
      "\r\n",
      "\u001b[33mcommit 0714e370615f919b92995b96eeea79dc475f1064\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Jul 26 14:52:50 2021 +0800\r\n",
      "\r\n",
      "    target encoding feature: 默认使用统计信息进行特征筛选\r\n",
      "\r\n",
      "\u001b[33mcommit cb928b678996a700a8e2c37ae725d5baab573558\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Jul 26 14:45:42 2021 +0800\r\n",
      "\r\n",
      "    target encoding feature: 优化统计信息筛选阈值\r\n",
      "\r\n",
      "\u001b[33mcommit e2a3e989e4b8b911663d871decfdcff05c818f45\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Mon Jul 26 14:39:50 2021 +0800\r\n",
      "\r\n",
      "    debug target encoding feature.\r\n",
      "\r\n",
      "\u001b[33mcommit 855c6c962ac0e9a716c9bc35441fee35bb89bf65\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Sat Jul 24 10:25:33 2021 +0800\r\n",
      "\r\n",
      "    add license file\r\n",
      "\r\n",
      "\u001b[33mcommit b5297ac2334e9b6d008d0e2d1c7a7e6b7dd61b78\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Jul 22 15:20:24 2021 +0800\r\n",
      "\r\n",
      "    modify README.md;\r\n",
      "    增加zhidemai_automl.ipynb.\r\n",
      "\r\n",
      "\u001b[33mcommit 8fb15db690010c060a11e3d28d5a9fdaa268113a\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Jul 22 14:36:09 2021 +0800\r\n",
      "\r\n",
      "    del sub files.\r\n",
      "\r\n",
      "\u001b[33mcommit 74ef3c0664934bb0033c178e50df9fee0986df55\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Jul 22 14:29:32 2021 +0800\r\n",
      "\r\n",
      "    first commit\r\n",
      "\r\n",
      "\u001b[33mcommit 4d75036cbf5db2927ba3233a9cdda4a32c022d85\u001b[m\r\n",
      "Author: poteman <946691288@qq.com>\r\n",
      "Date:   Thu Jul 22 14:26:45 2021 +0800\r\n",
      "\r\n",
      "    first commit\r\n"
     ]
    }
   ],
   "source": [
    "!git log"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "9185f791",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T06:32:56.706257Z",
     "start_time": "2021-10-18T06:32:52.449974Z"
    }
   },
   "outputs": [],
   "source": [
    "from autox import AutoX\n",
    "import pandas as pd\n",
    "import numpy as np\n",
    "import os\n",
    "from tqdm import tqdm"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "fa24e429",
   "metadata": {},
   "source": [
    "## 配置数据信息"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "cb67a86f",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T06:32:56.717973Z",
     "start_time": "2021-10-18T06:32:56.709246Z"
    }
   },
   "outputs": [],
   "source": [
    "# 选择数据集\n",
    "data_name = 'ventilator'\n",
    "path = f'./data/{data_name}'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "aeb132c6",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T06:32:56.726566Z",
     "start_time": "2021-10-18T06:32:56.722432Z"
    }
   },
   "outputs": [],
   "source": [
    "feature_type = {\n",
    "'train.csv': {\n",
    "   'id': 'cat',\n",
    "   'breath_id': 'cat',\n",
    "   'R': 'num',\n",
    "   'C': 'num',\n",
    "   'time_step': 'num',\n",
    "   'u_in': 'num',\n",
    "   'u_out': 'num',\n",
    "   'pressure': 'num'\n",
    "},\n",
    "'test.csv': {\n",
    "   'id': 'cat',\n",
    "   'breath_id': 'cat',\n",
    "   'R': 'num',\n",
    "   'C': 'num',\n",
    "   'time_step': 'num',\n",
    "   'u_in': 'num',\n",
    "   'u_out': 'num'\n",
    "}\n",
    "}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "b722824a",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T06:33:15.068795Z",
     "start_time": "2021-10-18T06:33:07.799410Z"
    },
    "scrolled": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "   INFO ->  [+] read sample_submission.csv\n",
      "   INFO ->  Memory usage of dataframe is 61.40 MB\n",
      "   INFO ->  Memory usage after optimization is: 19.19 MB\n",
      "   INFO ->  Decreased by 68.7%\n",
      "   INFO ->  table = sample_submission.csv, shape = (4024000, 2)\n",
      "   INFO ->  [+] read train.csv\n",
      "   INFO ->  Memory usage of dataframe is 368.41 MB\n",
      "   INFO ->  Memory usage after optimization is: 97.86 MB\n",
      "   INFO ->  Decreased by 73.4%\n",
      "   INFO ->  table = train.csv, shape = (6036000, 8)\n",
      "   INFO ->  [+] read test.csv\n",
      "   INFO ->  Memory usage of dataframe is 214.90 MB\n",
      "   INFO ->  Memory usage after optimization is: 57.56 MB\n",
      "   INFO ->  Decreased by 73.2%\n",
      "   INFO ->  table = test.csv, shape = (4024000, 7)\n"
     ]
    }
   ],
   "source": [
    "autox = AutoX(target = 'pressure', train_name = 'train.csv', test_name = 'test.csv', \n",
    "               id = ['id'], path = path, feature_type = feature_type, metric = 'mae')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "fc6898fc",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T23:15:53.207207Z",
     "start_time": "2021-10-18T06:33:17.076603Z"
    },
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "   INFO ->  start feature engineer\n",
      "   INFO ->  feature engineer: time\n",
      "   INFO ->  featureTime ops: []\n",
      "0it [00:00, ?it/s]\n",
      "   INFO ->  feature engineer: Cumsum\n",
      "100%|██████████| 1/1 [00:03<00:00,  3.68s/it]\n",
      "   INFO ->  featureCumsum ops: {'breath_id': ['R', 'C', 'time_step', 'u_in', 'u_out']}\n",
      "   INFO ->  feature engineer: Shift\n",
      "100%|██████████| 1/1 [00:32<00:00, 32.35s/it]\n",
      "   INFO ->  featureShift ops: {'breath_id': ['R', 'C', 'time_step', 'u_in', 'u_out']}\n",
      "   INFO ->  feature engineer: Diff\n",
      "100%|██████████| 1/1 [00:55<00:00, 55.45s/it]\n",
      "   INFO ->  featureDiff ops: {'breath_id': ['R', 'C', 'time_step', 'u_in', 'u_out']}\n",
      "   INFO ->  feature engineer: Stat\n",
      "100%|██████████| 1/1 [00:10<00:00, 10.88s/it]\n",
      "   INFO ->  featureStat ops: {'breath_id': {'R': ['mean', 'min', 'max', 'mean', 'std'], 'C': ['mean', 'min', 'max', 'mean', 'std'], 'time_step': ['mean', 'min', 'max', 'mean', 'std'], 'u_in': ['mean', 'min', 'max', 'mean', 'std'], 'u_out': ['mean', 'min', 'max', 'mean', 'std']}}\n",
      "   INFO ->  feature engineer: NLP\n",
      "0it [00:00, ?it/s]\n",
      "   INFO ->  featureNlp ops: []\n",
      "   INFO ->  feature engineer: Count\n",
      "100%|██████████| 1/1 [00:00<00:00,  2.20it/s]\n",
      "   INFO ->  featureCount ops: [['breath_id']]\n",
      "   INFO ->  feature engineer: Rank\n",
      "100%|██████████| 1/1 [00:09<00:00,  9.96s/it]\n",
      "   INFO ->  featureRank ops: {'breath_id': {'R': ['rank'], 'C': ['rank'], 'time_step': ['rank'], 'u_in': ['rank'], 'u_out': ['rank'], 'pressure': ['rank']}}\n",
      "100%|██████████| 8/8 [00:08<00:00,  1.03s/it]\n",
      "   INFO ->  label_encoder_list: ['breath_id']\n",
      "   INFO ->  feature combination\n",
      "   INFO ->  shape of FE_all: (10060000, 160), shape of train: (6036000, 160), shape of test: (4024000, 160)\n",
      "   INFO ->  feature filter\n",
      "100%|██████████| 160/160 [01:37<00:00,  1.64it/s]\n",
      "   INFO ->  filtered features: ['id', 'pressure', 'breath_id__pressure__rank']\n",
      "   INFO ->  used_features: ['breath_id', 'R', 'C', 'time_step', 'u_in', 'u_out', 'COUNT_breath_id', 'breath_id__R__mean', 'breath_id__R__min', 'breath_id__R__max', 'breath_id__R__std', 'breath_id__C__mean', 'breath_id__C__min', 'breath_id__C__max', 'breath_id__C__std', 'breath_id__time_step__mean', 'breath_id__time_step__min', 'breath_id__time_step__max', 'breath_id__time_step__std', 'breath_id__u_in__mean', 'breath_id__u_in__min', 'breath_id__u_in__max', 'breath_id__u_in__std', 'breath_id__u_out__mean', 'breath_id__u_out__min', 'breath_id__u_out__max', 'breath_id__u_out__std', 'breath_id__R__rank', 'breath_id__C__rank', 'breath_id__time_step__rank', 'breath_id__u_in__rank', 'breath_id__u_out__rank', 'breath_id__R__shift__-30', 'breath_id__R__shift__-24', 'breath_id__R__shift__-7', 'breath_id__R__shift__-3', 'breath_id__R__shift__-2', 'breath_id__R__shift__-1', 'breath_id__R__shift__1', 'breath_id__R__shift__2', 'breath_id__R__shift__3', 'breath_id__R__shift__7', 'breath_id__R__shift__24', 'breath_id__R__shift__30', 'breath_id__C__shift__-30', 'breath_id__C__shift__-24', 'breath_id__C__shift__-7', 'breath_id__C__shift__-3', 'breath_id__C__shift__-2', 'breath_id__C__shift__-1', 'breath_id__C__shift__1', 'breath_id__C__shift__2', 'breath_id__C__shift__3', 'breath_id__C__shift__7', 'breath_id__C__shift__24', 'breath_id__C__shift__30', 'breath_id__time_step__shift__-30', 'breath_id__time_step__shift__-24', 'breath_id__time_step__shift__-7', 'breath_id__time_step__shift__-3', 'breath_id__time_step__shift__-2', 'breath_id__time_step__shift__-1', 'breath_id__time_step__shift__1', 'breath_id__time_step__shift__2', 'breath_id__time_step__shift__3', 'breath_id__time_step__shift__7', 'breath_id__time_step__shift__24', 'breath_id__time_step__shift__30', 'breath_id__u_in__shift__-30', 'breath_id__u_in__shift__-24', 'breath_id__u_in__shift__-7', 'breath_id__u_in__shift__-3', 'breath_id__u_in__shift__-2', 'breath_id__u_in__shift__-1', 'breath_id__u_in__shift__1', 'breath_id__u_in__shift__2', 'breath_id__u_in__shift__3', 'breath_id__u_in__shift__7', 'breath_id__u_in__shift__24', 'breath_id__u_in__shift__30', 'breath_id__u_out__shift__-30', 'breath_id__u_out__shift__-24', 'breath_id__u_out__shift__-7', 'breath_id__u_out__shift__-3', 'breath_id__u_out__shift__-2', 'breath_id__u_out__shift__-1', 'breath_id__u_out__shift__1', 'breath_id__u_out__shift__2', 'breath_id__u_out__shift__3', 'breath_id__u_out__shift__7', 'breath_id__u_out__shift__24', 'breath_id__u_out__shift__30', 'breath_id__R__diff__-30', 'breath_id__R__diff__-24', 'breath_id__R__diff__-7', 'breath_id__R__diff__-3', 'breath_id__R__diff__-2', 'breath_id__R__diff__-1', 'breath_id__R__diff__1', 'breath_id__R__diff__2', 'breath_id__R__diff__3', 'breath_id__R__diff__7', 'breath_id__R__diff__24', 'breath_id__R__diff__30', 'breath_id__C__diff__-30', 'breath_id__C__diff__-24', 'breath_id__C__diff__-7', 'breath_id__C__diff__-3', 'breath_id__C__diff__-2', 'breath_id__C__diff__-1', 'breath_id__C__diff__1', 'breath_id__C__diff__2', 'breath_id__C__diff__3', 'breath_id__C__diff__7', 'breath_id__C__diff__24', 'breath_id__C__diff__30', 'breath_id__time_step__diff__-30', 'breath_id__time_step__diff__-24', 'breath_id__time_step__diff__-7', 'breath_id__time_step__diff__-3', 'breath_id__time_step__diff__-2', 'breath_id__time_step__diff__-1', 'breath_id__time_step__diff__1', 'breath_id__time_step__diff__2', 'breath_id__time_step__diff__3', 'breath_id__time_step__diff__7', 'breath_id__time_step__diff__24', 'breath_id__time_step__diff__30', 'breath_id__u_in__diff__-30', 'breath_id__u_in__diff__-24', 'breath_id__u_in__diff__-7', 'breath_id__u_in__diff__-3', 'breath_id__u_in__diff__-2', 'breath_id__u_in__diff__-1', 'breath_id__u_in__diff__1', 'breath_id__u_in__diff__2', 'breath_id__u_in__diff__3', 'breath_id__u_in__diff__7', 'breath_id__u_in__diff__24', 'breath_id__u_in__diff__30', 'breath_id__u_out__diff__-30', 'breath_id__u_out__diff__-24', 'breath_id__u_out__diff__-7', 'breath_id__u_out__diff__-3', 'breath_id__u_out__diff__-2', 'breath_id__u_out__diff__-1', 'breath_id__u_out__diff__1', 'breath_id__u_out__diff__2', 'breath_id__u_out__diff__3', 'breath_id__u_out__diff__7', 'breath_id__u_out__diff__24', 'breath_id__u_out__diff__30', 'breath_id__R__cumsum', 'breath_id__C__cumsum', 'breath_id__time_step__cumsum', 'breath_id__u_in__cumsum', 'breath_id__u_out__cumsum']\n",
      "   INFO ->  start training model\n",
      "   INFO ->  (6036000, 157)\n",
      "   INFO ->  [+]tuning params\n",
      "\u001b[32m[I 2021-10-18 14:38:58,622]\u001b[0m A new study created in memory with name: LgbRegressor\u001b[0m\n",
      "\u001b[32m[I 2021-10-18 15:24:12,079]\u001b[0m Trial 0 finished with value: 0.9931323009339542 and parameters: {'num_leaves': 333, 'num_boost_round': 7941, 'max_depth': 4}. Best is trial 0 with value: 0.9931323009339542.\u001b[0m\n",
      "   INFO ->  Number of finished trials: 1\n",
      "   INFO ->  Best trial:\n",
      "   INFO ->  \tValue: 0.9931323009339542\n",
      "   INFO ->  \tParams: \n",
      "   INFO ->  \t\tnum_leaves: 333\n",
      "   INFO ->  \t\tnum_boost_round: 7941\n",
      "   INFO ->  \t\tmax_depth: 4\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training on fold 1\n",
      "Training until validation scores don't improve for 150 rounds\n",
      "[100]\ttraining's l1: 2.87884\tvalid_1's l1: 2.87847\n",
      "[200]\ttraining's l1: 1.78309\tvalid_1's l1: 1.78251\n",
      "[300]\ttraining's l1: 1.39904\tvalid_1's l1: 1.39868\n",
      "[400]\ttraining's l1: 1.23719\tvalid_1's l1: 1.23655\n",
      "[500]\ttraining's l1: 1.15512\tvalid_1's l1: 1.15416\n",
      "[600]\ttraining's l1: 1.08844\tvalid_1's l1: 1.08719\n",
      "[700]\ttraining's l1: 1.04133\tvalid_1's l1: 1.04003\n",
      "[800]\ttraining's l1: 1.00198\tvalid_1's l1: 1.00063\n",
      "[900]\ttraining's l1: 0.97046\tvalid_1's l1: 0.969106\n",
      "[1000]\ttraining's l1: 0.94364\tvalid_1's l1: 0.942321\n",
      "[1100]\ttraining's l1: 0.922279\tvalid_1's l1: 0.921009\n",
      "[1200]\ttraining's l1: 0.905353\tvalid_1's l1: 0.904118\n",
      "[1300]\ttraining's l1: 0.889776\tvalid_1's l1: 0.888589\n",
      "[1400]\ttraining's l1: 0.875932\tvalid_1's l1: 0.874755\n",
      "[1500]\ttraining's l1: 0.864716\tvalid_1's l1: 0.863629\n",
      "[1600]\ttraining's l1: 0.85194\tvalid_1's l1: 0.850912\n",
      "[1700]\ttraining's l1: 0.839416\tvalid_1's l1: 0.838465\n",
      "[1800]\ttraining's l1: 0.829068\tvalid_1's l1: 0.828231\n",
      "[1900]\ttraining's l1: 0.819321\tvalid_1's l1: 0.818599\n",
      "[2000]\ttraining's l1: 0.809905\tvalid_1's l1: 0.809264\n",
      "[2100]\ttraining's l1: 0.801894\tvalid_1's l1: 0.801308\n",
      "[2200]\ttraining's l1: 0.79394\tvalid_1's l1: 0.793379\n",
      "[2300]\ttraining's l1: 0.787247\tvalid_1's l1: 0.78676\n",
      "[2400]\ttraining's l1: 0.780728\tvalid_1's l1: 0.780277\n",
      "[2500]\ttraining's l1: 0.774781\tvalid_1's l1: 0.774383\n",
      "[2600]\ttraining's l1: 0.767979\tvalid_1's l1: 0.767627\n",
      "[2700]\ttraining's l1: 0.761873\tvalid_1's l1: 0.761532\n",
      "[2800]\ttraining's l1: 0.756431\tvalid_1's l1: 0.756102\n",
      "[2900]\ttraining's l1: 0.750928\tvalid_1's l1: 0.75062\n",
      "[3000]\ttraining's l1: 0.745765\tvalid_1's l1: 0.74547\n",
      "[3100]\ttraining's l1: 0.740738\tvalid_1's l1: 0.740445\n",
      "[3200]\ttraining's l1: 0.735728\tvalid_1's l1: 0.735446\n",
      "[3300]\ttraining's l1: 0.73076\tvalid_1's l1: 0.730511\n",
      "[3400]\ttraining's l1: 0.726731\tvalid_1's l1: 0.72651\n",
      "[3500]\ttraining's l1: 0.722648\tvalid_1's l1: 0.72245\n",
      "[3600]\ttraining's l1: 0.718719\tvalid_1's l1: 0.718557\n",
      "[3700]\ttraining's l1: 0.715286\tvalid_1's l1: 0.715151\n",
      "[3800]\ttraining's l1: 0.711839\tvalid_1's l1: 0.711717\n",
      "[3900]\ttraining's l1: 0.708352\tvalid_1's l1: 0.708264\n",
      "[4000]\ttraining's l1: 0.704943\tvalid_1's l1: 0.70487\n",
      "[4100]\ttraining's l1: 0.701522\tvalid_1's l1: 0.701476\n",
      "[4200]\ttraining's l1: 0.698\tvalid_1's l1: 0.69798\n",
      "[4300]\ttraining's l1: 0.694822\tvalid_1's l1: 0.694823\n",
      "[4400]\ttraining's l1: 0.692045\tvalid_1's l1: 0.69205\n",
      "[4500]\ttraining's l1: 0.68925\tvalid_1's l1: 0.689261\n",
      "[4600]\ttraining's l1: 0.686312\tvalid_1's l1: 0.686343\n",
      "[4700]\ttraining's l1: 0.68343\tvalid_1's l1: 0.683482\n",
      "[4800]\ttraining's l1: 0.680519\tvalid_1's l1: 0.680603\n",
      "[4900]\ttraining's l1: 0.678021\tvalid_1's l1: 0.678127\n",
      "[5000]\ttraining's l1: 0.675185\tvalid_1's l1: 0.675313\n",
      "[5100]\ttraining's l1: 0.672809\tvalid_1's l1: 0.672945\n",
      "[5200]\ttraining's l1: 0.670282\tvalid_1's l1: 0.670431\n",
      "[5300]\ttraining's l1: 0.668206\tvalid_1's l1: 0.668364\n",
      "[5400]\ttraining's l1: 0.666084\tvalid_1's l1: 0.666265\n",
      "[5500]\ttraining's l1: 0.663779\tvalid_1's l1: 0.663988\n",
      "[5600]\ttraining's l1: 0.661988\tvalid_1's l1: 0.662229\n",
      "[5700]\ttraining's l1: 0.659996\tvalid_1's l1: 0.660243\n",
      "[5800]\ttraining's l1: 0.657994\tvalid_1's l1: 0.658263\n",
      "[5900]\ttraining's l1: 0.656125\tvalid_1's l1: 0.656409\n",
      "[6000]\ttraining's l1: 0.653877\tvalid_1's l1: 0.654178\n",
      "[6100]\ttraining's l1: 0.651908\tvalid_1's l1: 0.652225\n",
      "[6200]\ttraining's l1: 0.649651\tvalid_1's l1: 0.649986\n",
      "[6300]\ttraining's l1: 0.647607\tvalid_1's l1: 0.647965\n",
      "[6400]\ttraining's l1: 0.64598\tvalid_1's l1: 0.646345\n",
      "[6500]\ttraining's l1: 0.64416\tvalid_1's l1: 0.644545\n",
      "[6600]\ttraining's l1: 0.641965\tvalid_1's l1: 0.642365\n",
      "[6700]\ttraining's l1: 0.639876\tvalid_1's l1: 0.640286\n",
      "[6800]\ttraining's l1: 0.638356\tvalid_1's l1: 0.638772\n",
      "[6900]\ttraining's l1: 0.636488\tvalid_1's l1: 0.636921\n",
      "[7000]\ttraining's l1: 0.634553\tvalid_1's l1: 0.63501\n",
      "[7100]\ttraining's l1: 0.632606\tvalid_1's l1: 0.633086\n",
      "[7200]\ttraining's l1: 0.630842\tvalid_1's l1: 0.631334\n",
      "[7300]\ttraining's l1: 0.629021\tvalid_1's l1: 0.629513\n",
      "[7400]\ttraining's l1: 0.62749\tvalid_1's l1: 0.627996\n",
      "[7500]\ttraining's l1: 0.625911\tvalid_1's l1: 0.626421\n",
      "[7600]\ttraining's l1: 0.624434\tvalid_1's l1: 0.62495\n",
      "[7700]\ttraining's l1: 0.622849\tvalid_1's l1: 0.623389\n",
      "[7800]\ttraining's l1: 0.621221\tvalid_1's l1: 0.621777\n",
      "[7900]\ttraining's l1: 0.619836\tvalid_1's l1: 0.620405\n",
      "Did not meet early stopping. Best iteration is:\n",
      "[7941]\ttraining's l1: 0.619081\tvalid_1's l1: 0.619658\n",
      "MSE: 0.9898252303211249\n",
      "Fold 1 finished in 1:52:24.488230\n",
      "Training on fold 2\n",
      "Training until validation scores don't improve for 150 rounds\n",
      "[100]\ttraining's l1: 2.87514\tvalid_1's l1: 2.87891\n",
      "[200]\ttraining's l1: 1.78182\tvalid_1's l1: 1.7837\n",
      "[300]\ttraining's l1: 1.39565\tvalid_1's l1: 1.39749\n",
      "[400]\ttraining's l1: 1.23818\tvalid_1's l1: 1.24032\n",
      "[500]\ttraining's l1: 1.15408\tvalid_1's l1: 1.15644\n",
      "[600]\ttraining's l1: 1.09115\tvalid_1's l1: 1.09371\n",
      "[700]\ttraining's l1: 1.04593\tvalid_1's l1: 1.04849\n",
      "[800]\ttraining's l1: 1.00572\tvalid_1's l1: 1.0083\n",
      "[900]\ttraining's l1: 0.973716\tvalid_1's l1: 0.976343\n",
      "[1000]\ttraining's l1: 0.948803\tvalid_1's l1: 0.951452\n",
      "[1100]\ttraining's l1: 0.927049\tvalid_1's l1: 0.929693\n",
      "[1200]\ttraining's l1: 0.910378\tvalid_1's l1: 0.912995\n",
      "[1300]\ttraining's l1: 0.894805\tvalid_1's l1: 0.897402\n",
      "[1400]\ttraining's l1: 0.880323\tvalid_1's l1: 0.882877\n",
      "[1500]\ttraining's l1: 0.86607\tvalid_1's l1: 0.868598\n",
      "[1600]\ttraining's l1: 0.852675\tvalid_1's l1: 0.855231\n",
      "[1700]\ttraining's l1: 0.840755\tvalid_1's l1: 0.843299\n",
      "[1800]\ttraining's l1: 0.830587\tvalid_1's l1: 0.833116\n",
      "[1900]\ttraining's l1: 0.819941\tvalid_1's l1: 0.822435\n",
      "[2000]\ttraining's l1: 0.809794\tvalid_1's l1: 0.812223\n",
      "[2100]\ttraining's l1: 0.801365\tvalid_1's l1: 0.80371\n",
      "[2200]\ttraining's l1: 0.793906\tvalid_1's l1: 0.796176\n",
      "[2300]\ttraining's l1: 0.785734\tvalid_1's l1: 0.787985\n",
      "[2400]\ttraining's l1: 0.779148\tvalid_1's l1: 0.781348\n",
      "[2500]\ttraining's l1: 0.773369\tvalid_1's l1: 0.775529\n",
      "[2600]\ttraining's l1: 0.767286\tvalid_1's l1: 0.769398\n",
      "[2700]\ttraining's l1: 0.761117\tvalid_1's l1: 0.763174\n",
      "[2800]\ttraining's l1: 0.755429\tvalid_1's l1: 0.757442\n",
      "[2900]\ttraining's l1: 0.750575\tvalid_1's l1: 0.75254\n",
      "[3000]\ttraining's l1: 0.744921\tvalid_1's l1: 0.746835\n",
      "[3100]\ttraining's l1: 0.739679\tvalid_1's l1: 0.74156\n",
      "[3200]\ttraining's l1: 0.734713\tvalid_1's l1: 0.736565\n",
      "[3300]\ttraining's l1: 0.730218\tvalid_1's l1: 0.732041\n",
      "[3400]\ttraining's l1: 0.725749\tvalid_1's l1: 0.727545\n",
      "[3500]\ttraining's l1: 0.721196\tvalid_1's l1: 0.722966\n",
      "[3600]\ttraining's l1: 0.717514\tvalid_1's l1: 0.719247\n",
      "[3700]\ttraining's l1: 0.713553\tvalid_1's l1: 0.715252\n",
      "[3800]\ttraining's l1: 0.709697\tvalid_1's l1: 0.711375\n",
      "[3900]\ttraining's l1: 0.70621\tvalid_1's l1: 0.707875\n",
      "[4000]\ttraining's l1: 0.702788\tvalid_1's l1: 0.704431\n",
      "[4100]\ttraining's l1: 0.699259\tvalid_1's l1: 0.700871\n",
      "[4200]\ttraining's l1: 0.696186\tvalid_1's l1: 0.697797\n",
      "[4300]\ttraining's l1: 0.693048\tvalid_1's l1: 0.694641\n",
      "[4400]\ttraining's l1: 0.690215\tvalid_1's l1: 0.691801\n",
      "[4500]\ttraining's l1: 0.687888\tvalid_1's l1: 0.689475\n",
      "[4600]\ttraining's l1: 0.684395\tvalid_1's l1: 0.685983\n",
      "[4700]\ttraining's l1: 0.681698\tvalid_1's l1: 0.683273\n",
      "[4800]\ttraining's l1: 0.679321\tvalid_1's l1: 0.680903\n",
      "[4900]\ttraining's l1: 0.676799\tvalid_1's l1: 0.678386\n",
      "[5000]\ttraining's l1: 0.674385\tvalid_1's l1: 0.675967\n",
      "[5100]\ttraining's l1: 0.67165\tvalid_1's l1: 0.673231\n",
      "[5200]\ttraining's l1: 0.669447\tvalid_1's l1: 0.671034\n",
      "[5300]\ttraining's l1: 0.667063\tvalid_1's l1: 0.668639\n",
      "[5400]\ttraining's l1: 0.664819\tvalid_1's l1: 0.66639\n",
      "[5500]\ttraining's l1: 0.662769\tvalid_1's l1: 0.664334\n",
      "[5600]\ttraining's l1: 0.66078\tvalid_1's l1: 0.662348\n",
      "[5700]\ttraining's l1: 0.658919\tvalid_1's l1: 0.660493\n",
      "[5800]\ttraining's l1: 0.657084\tvalid_1's l1: 0.65866\n",
      "[5900]\ttraining's l1: 0.655387\tvalid_1's l1: 0.656956\n",
      "[6000]\ttraining's l1: 0.653069\tvalid_1's l1: 0.654644\n",
      "[6100]\ttraining's l1: 0.651027\tvalid_1's l1: 0.652607\n",
      "[6200]\ttraining's l1: 0.648824\tvalid_1's l1: 0.65041\n",
      "[6300]\ttraining's l1: 0.646559\tvalid_1's l1: 0.648154\n",
      "[6400]\ttraining's l1: 0.644709\tvalid_1's l1: 0.646302\n",
      "[6500]\ttraining's l1: 0.642989\tvalid_1's l1: 0.644587\n",
      "[6600]\ttraining's l1: 0.640817\tvalid_1's l1: 0.642425\n",
      "[6700]\ttraining's l1: 0.638788\tvalid_1's l1: 0.640411\n",
      "[6800]\ttraining's l1: 0.637027\tvalid_1's l1: 0.638665\n",
      "[6900]\ttraining's l1: 0.635438\tvalid_1's l1: 0.637082\n",
      "[7000]\ttraining's l1: 0.633599\tvalid_1's l1: 0.635247\n",
      "[7100]\ttraining's l1: 0.631981\tvalid_1's l1: 0.633626\n",
      "[7200]\ttraining's l1: 0.630345\tvalid_1's l1: 0.631994\n",
      "[7300]\ttraining's l1: 0.628607\tvalid_1's l1: 0.630259\n",
      "[7400]\ttraining's l1: 0.626851\tvalid_1's l1: 0.628515\n",
      "[7500]\ttraining's l1: 0.625175\tvalid_1's l1: 0.626846\n",
      "[7600]\ttraining's l1: 0.623714\tvalid_1's l1: 0.625398\n",
      "[7700]\ttraining's l1: 0.622427\tvalid_1's l1: 0.624117\n",
      "[7800]\ttraining's l1: 0.621022\tvalid_1's l1: 0.622711\n",
      "[7900]\ttraining's l1: 0.619499\tvalid_1's l1: 0.621187\n",
      "Did not meet early stopping. Best iteration is:\n",
      "[7941]\ttraining's l1: 0.618801\tvalid_1's l1: 0.620487\n",
      "MSE: 0.9957566029085582\n",
      "Fold 2 finished in 2:23:29.691634\n",
      "Training on fold 3\n",
      "Training until validation scores don't improve for 150 rounds\n",
      "[100]\ttraining's l1: 2.88384\tvalid_1's l1: 2.88359\n",
      "[200]\ttraining's l1: 1.77958\tvalid_1's l1: 1.78024\n",
      "[300]\ttraining's l1: 1.39487\tvalid_1's l1: 1.39537\n",
      "[400]\ttraining's l1: 1.23677\tvalid_1's l1: 1.23689\n",
      "[500]\ttraining's l1: 1.15204\tvalid_1's l1: 1.15226\n",
      "[600]\ttraining's l1: 1.09063\tvalid_1's l1: 1.09096\n",
      "[700]\ttraining's l1: 1.04486\tvalid_1's l1: 1.04522\n",
      "[800]\ttraining's l1: 1.00425\tvalid_1's l1: 1.00464\n",
      "[900]\ttraining's l1: 0.972698\tvalid_1's l1: 0.973184\n",
      "[1000]\ttraining's l1: 0.948147\tvalid_1's l1: 0.948716\n",
      "[1100]\ttraining's l1: 0.928653\tvalid_1's l1: 0.929266\n",
      "[1200]\ttraining's l1: 0.910358\tvalid_1's l1: 0.911048\n",
      "[1300]\ttraining's l1: 0.895235\tvalid_1's l1: 0.896001\n",
      "[1400]\ttraining's l1: 0.882005\tvalid_1's l1: 0.88281\n",
      "[1500]\ttraining's l1: 0.869786\tvalid_1's l1: 0.870669\n",
      "[1600]\ttraining's l1: 0.856574\tvalid_1's l1: 0.857494\n",
      "[1700]\ttraining's l1: 0.844798\tvalid_1's l1: 0.845738\n",
      "[1800]\ttraining's l1: 0.834058\tvalid_1's l1: 0.834998\n",
      "[1900]\ttraining's l1: 0.824095\tvalid_1's l1: 0.825044\n",
      "[2000]\ttraining's l1: 0.815856\tvalid_1's l1: 0.816841\n",
      "[2100]\ttraining's l1: 0.807477\tvalid_1's l1: 0.808505\n",
      "[2200]\ttraining's l1: 0.800023\tvalid_1's l1: 0.801078\n",
      "[2300]\ttraining's l1: 0.792806\tvalid_1's l1: 0.79387\n",
      "[2400]\ttraining's l1: 0.786304\tvalid_1's l1: 0.787401\n",
      "[2500]\ttraining's l1: 0.778779\tvalid_1's l1: 0.779899\n",
      "[2600]\ttraining's l1: 0.772474\tvalid_1's l1: 0.773655\n",
      "[2700]\ttraining's l1: 0.767155\tvalid_1's l1: 0.768381\n",
      "[2800]\ttraining's l1: 0.760937\tvalid_1's l1: 0.762191\n",
      "[2900]\ttraining's l1: 0.754643\tvalid_1's l1: 0.755931\n",
      "[3000]\ttraining's l1: 0.749103\tvalid_1's l1: 0.750415\n",
      "[3100]\ttraining's l1: 0.744327\tvalid_1's l1: 0.745674\n",
      "[3200]\ttraining's l1: 0.739333\tvalid_1's l1: 0.740721\n",
      "[3300]\ttraining's l1: 0.7341\tvalid_1's l1: 0.735502\n",
      "[3400]\ttraining's l1: 0.730008\tvalid_1's l1: 0.731433\n",
      "[3500]\ttraining's l1: 0.726284\tvalid_1's l1: 0.727722\n",
      "[3600]\ttraining's l1: 0.722524\tvalid_1's l1: 0.723983\n",
      "[3700]\ttraining's l1: 0.7183\tvalid_1's l1: 0.719786\n",
      "[3800]\ttraining's l1: 0.714188\tvalid_1's l1: 0.715712\n",
      "[3900]\ttraining's l1: 0.710601\tvalid_1's l1: 0.712157\n",
      "[4000]\ttraining's l1: 0.707037\tvalid_1's l1: 0.708633\n",
      "[4100]\ttraining's l1: 0.703266\tvalid_1's l1: 0.704908\n",
      "[4200]\ttraining's l1: 0.700115\tvalid_1's l1: 0.701788\n",
      "[4300]\ttraining's l1: 0.697134\tvalid_1's l1: 0.698832\n",
      "[4400]\ttraining's l1: 0.69412\tvalid_1's l1: 0.695849\n",
      "[4500]\ttraining's l1: 0.691143\tvalid_1's l1: 0.6929\n",
      "[4600]\ttraining's l1: 0.688368\tvalid_1's l1: 0.690149\n",
      "[4700]\ttraining's l1: 0.685865\tvalid_1's l1: 0.687675\n",
      "[4800]\ttraining's l1: 0.683008\tvalid_1's l1: 0.684841\n",
      "[4900]\ttraining's l1: 0.680298\tvalid_1's l1: 0.682157\n",
      "[5000]\ttraining's l1: 0.677534\tvalid_1's l1: 0.679418\n",
      "[5100]\ttraining's l1: 0.675081\tvalid_1's l1: 0.676992\n",
      "[5200]\ttraining's l1: 0.672625\tvalid_1's l1: 0.674556\n",
      "[5300]\ttraining's l1: 0.670445\tvalid_1's l1: 0.672391\n",
      "[5400]\ttraining's l1: 0.667606\tvalid_1's l1: 0.669573\n",
      "[5500]\ttraining's l1: 0.665329\tvalid_1's l1: 0.667312\n",
      "[5600]\ttraining's l1: 0.66291\tvalid_1's l1: 0.664917\n",
      "[5700]\ttraining's l1: 0.660714\tvalid_1's l1: 0.662727\n",
      "[5800]\ttraining's l1: 0.658524\tvalid_1's l1: 0.660548\n",
      "[5900]\ttraining's l1: 0.656295\tvalid_1's l1: 0.658336\n",
      "[6000]\ttraining's l1: 0.653899\tvalid_1's l1: 0.655961\n",
      "[6100]\ttraining's l1: 0.651379\tvalid_1's l1: 0.653447\n",
      "[6200]\ttraining's l1: 0.64931\tvalid_1's l1: 0.651396\n",
      "[6300]\ttraining's l1: 0.647294\tvalid_1's l1: 0.649389\n",
      "[6400]\ttraining's l1: 0.645934\tvalid_1's l1: 0.648053\n",
      "[6500]\ttraining's l1: 0.644274\tvalid_1's l1: 0.646405\n",
      "[6600]\ttraining's l1: 0.64237\tvalid_1's l1: 0.644518\n",
      "[6700]\ttraining's l1: 0.64049\tvalid_1's l1: 0.64266\n",
      "[6800]\ttraining's l1: 0.638764\tvalid_1's l1: 0.640948\n",
      "[6900]\ttraining's l1: 0.637062\tvalid_1's l1: 0.63926\n",
      "[7000]\ttraining's l1: 0.635703\tvalid_1's l1: 0.637918\n",
      "[7100]\ttraining's l1: 0.634081\tvalid_1's l1: 0.636304\n",
      "[7200]\ttraining's l1: 0.632467\tvalid_1's l1: 0.634706\n",
      "[7300]\ttraining's l1: 0.630953\tvalid_1's l1: 0.633204\n",
      "[7400]\ttraining's l1: 0.629365\tvalid_1's l1: 0.631618\n",
      "[7500]\ttraining's l1: 0.627754\tvalid_1's l1: 0.630012\n",
      "[7600]\ttraining's l1: 0.626201\tvalid_1's l1: 0.62846\n",
      "[7700]\ttraining's l1: 0.624663\tvalid_1's l1: 0.626936\n",
      "[7800]\ttraining's l1: 0.623376\tvalid_1's l1: 0.625665\n",
      "[7900]\ttraining's l1: 0.622016\tvalid_1's l1: 0.624319\n",
      "Did not meet early stopping. Best iteration is:\n",
      "[7941]\ttraining's l1: 0.621368\tvalid_1's l1: 0.623669\n",
      "MSE: 1.0075175045120857\n",
      "Fold 3 finished in 2:48:57.012793\n",
      "Training on fold 4\n",
      "Training until validation scores don't improve for 150 rounds\n",
      "[100]\ttraining's l1: 2.88419\tvalid_1's l1: 2.88346\n",
      "[200]\ttraining's l1: 1.77991\tvalid_1's l1: 1.7795\n",
      "[300]\ttraining's l1: 1.39613\tvalid_1's l1: 1.39604\n",
      "[400]\ttraining's l1: 1.24055\tvalid_1's l1: 1.24088\n",
      "[500]\ttraining's l1: 1.15521\tvalid_1's l1: 1.15556\n",
      "[600]\ttraining's l1: 1.09008\tvalid_1's l1: 1.09058\n",
      "[700]\ttraining's l1: 1.04106\tvalid_1's l1: 1.04172\n",
      "[800]\ttraining's l1: 1.00524\tvalid_1's l1: 1.00592\n",
      "[900]\ttraining's l1: 0.972137\tvalid_1's l1: 0.972761\n",
      "[1000]\ttraining's l1: 0.946626\tvalid_1's l1: 0.947216\n",
      "[1100]\ttraining's l1: 0.926097\tvalid_1's l1: 0.926694\n",
      "[1200]\ttraining's l1: 0.910237\tvalid_1's l1: 0.910889\n",
      "[1300]\ttraining's l1: 0.896196\tvalid_1's l1: 0.896862\n",
      "[1400]\ttraining's l1: 0.881963\tvalid_1's l1: 0.882685\n",
      "[1500]\ttraining's l1: 0.867854\tvalid_1's l1: 0.868609\n",
      "[1600]\ttraining's l1: 0.855322\tvalid_1's l1: 0.856139\n",
      "[1700]\ttraining's l1: 0.84225\tvalid_1's l1: 0.843066\n",
      "[1800]\ttraining's l1: 0.830842\tvalid_1's l1: 0.831641\n",
      "[1900]\ttraining's l1: 0.82124\tvalid_1's l1: 0.822065\n",
      "[2000]\ttraining's l1: 0.811788\tvalid_1's l1: 0.812634\n",
      "[2100]\ttraining's l1: 0.803794\tvalid_1's l1: 0.804643\n",
      "[2200]\ttraining's l1: 0.796517\tvalid_1's l1: 0.797351\n",
      "[2300]\ttraining's l1: 0.788481\tvalid_1's l1: 0.789322\n",
      "[2400]\ttraining's l1: 0.781277\tvalid_1's l1: 0.782098\n",
      "[2500]\ttraining's l1: 0.774663\tvalid_1's l1: 0.775485\n",
      "[2600]\ttraining's l1: 0.768424\tvalid_1's l1: 0.769236\n",
      "[2700]\ttraining's l1: 0.762195\tvalid_1's l1: 0.762989\n",
      "[2800]\ttraining's l1: 0.756029\tvalid_1's l1: 0.756813\n",
      "[2900]\ttraining's l1: 0.750789\tvalid_1's l1: 0.751585\n",
      "[3000]\ttraining's l1: 0.745166\tvalid_1's l1: 0.745966\n",
      "[3100]\ttraining's l1: 0.73993\tvalid_1's l1: 0.740752\n",
      "[3200]\ttraining's l1: 0.735148\tvalid_1's l1: 0.735995\n",
      "[3300]\ttraining's l1: 0.730887\tvalid_1's l1: 0.731752\n",
      "[3400]\ttraining's l1: 0.725918\tvalid_1's l1: 0.726794\n",
      "[3500]\ttraining's l1: 0.722059\tvalid_1's l1: 0.722942\n",
      "[3600]\ttraining's l1: 0.718453\tvalid_1's l1: 0.719343\n",
      "[3700]\ttraining's l1: 0.714761\tvalid_1's l1: 0.715659\n",
      "[3800]\ttraining's l1: 0.71107\tvalid_1's l1: 0.711963\n",
      "[3900]\ttraining's l1: 0.706909\tvalid_1's l1: 0.707837\n",
      "[4000]\ttraining's l1: 0.70344\tvalid_1's l1: 0.704382\n",
      "[4100]\ttraining's l1: 0.700401\tvalid_1's l1: 0.701344\n",
      "[4200]\ttraining's l1: 0.69751\tvalid_1's l1: 0.698457\n",
      "[4300]\ttraining's l1: 0.694544\tvalid_1's l1: 0.695502\n",
      "[4400]\ttraining's l1: 0.691346\tvalid_1's l1: 0.692303\n",
      "[4500]\ttraining's l1: 0.688439\tvalid_1's l1: 0.689408\n",
      "[4600]\ttraining's l1: 0.685569\tvalid_1's l1: 0.686546\n",
      "[4700]\ttraining's l1: 0.682753\tvalid_1's l1: 0.683725\n",
      "[4800]\ttraining's l1: 0.680162\tvalid_1's l1: 0.68114\n",
      "[4900]\ttraining's l1: 0.677717\tvalid_1's l1: 0.6787\n",
      "[5000]\ttraining's l1: 0.674929\tvalid_1's l1: 0.675912\n",
      "[5100]\ttraining's l1: 0.672651\tvalid_1's l1: 0.673658\n",
      "[5200]\ttraining's l1: 0.670382\tvalid_1's l1: 0.671385\n",
      "[5300]\ttraining's l1: 0.668041\tvalid_1's l1: 0.669046\n",
      "[5400]\ttraining's l1: 0.665666\tvalid_1's l1: 0.666683\n",
      "[5500]\ttraining's l1: 0.663395\tvalid_1's l1: 0.664426\n",
      "[5600]\ttraining's l1: 0.661286\tvalid_1's l1: 0.662327\n",
      "[5700]\ttraining's l1: 0.659061\tvalid_1's l1: 0.660131\n",
      "[5800]\ttraining's l1: 0.656907\tvalid_1's l1: 0.657988\n",
      "[5900]\ttraining's l1: 0.655027\tvalid_1's l1: 0.656126\n",
      "[6000]\ttraining's l1: 0.653132\tvalid_1's l1: 0.654243\n",
      "[6100]\ttraining's l1: 0.651444\tvalid_1's l1: 0.652567\n",
      "[6200]\ttraining's l1: 0.649559\tvalid_1's l1: 0.650698\n",
      "[6300]\ttraining's l1: 0.647249\tvalid_1's l1: 0.648388\n",
      "[6400]\ttraining's l1: 0.645358\tvalid_1's l1: 0.646511\n",
      "[6500]\ttraining's l1: 0.643253\tvalid_1's l1: 0.64441\n",
      "[6600]\ttraining's l1: 0.641418\tvalid_1's l1: 0.642594\n",
      "[6700]\ttraining's l1: 0.639399\tvalid_1's l1: 0.640587\n",
      "[6800]\ttraining's l1: 0.637488\tvalid_1's l1: 0.638693\n",
      "[6900]\ttraining's l1: 0.635508\tvalid_1's l1: 0.63674\n",
      "[7000]\ttraining's l1: 0.634016\tvalid_1's l1: 0.635267\n",
      "[7100]\ttraining's l1: 0.632423\tvalid_1's l1: 0.633687\n",
      "[7200]\ttraining's l1: 0.63066\tvalid_1's l1: 0.631946\n",
      "[7300]\ttraining's l1: 0.6289\tvalid_1's l1: 0.630199\n",
      "[7400]\ttraining's l1: 0.627468\tvalid_1's l1: 0.628784\n",
      "[7500]\ttraining's l1: 0.625755\tvalid_1's l1: 0.627082\n",
      "[7600]\ttraining's l1: 0.624199\tvalid_1's l1: 0.625543\n",
      "[7700]\ttraining's l1: 0.622487\tvalid_1's l1: 0.623845\n",
      "[7800]\ttraining's l1: 0.621086\tvalid_1's l1: 0.622463\n",
      "[7900]\ttraining's l1: 0.619539\tvalid_1's l1: 0.620927\n",
      "Did not meet early stopping. Best iteration is:\n",
      "[7941]\ttraining's l1: 0.618954\tvalid_1's l1: 0.620343\n",
      "MSE: 0.995521319530036\n",
      "Fold 4 finished in 3:09:10.830677\n",
      "Training on fold 5\n",
      "Training until validation scores don't improve for 150 rounds\n",
      "[100]\ttraining's l1: 2.88171\tvalid_1's l1: 2.87959\n",
      "[200]\ttraining's l1: 1.78166\tvalid_1's l1: 1.78067\n",
      "[300]\ttraining's l1: 1.39858\tvalid_1's l1: 1.39789\n",
      "[400]\ttraining's l1: 1.23801\tvalid_1's l1: 1.23737\n",
      "[500]\ttraining's l1: 1.15566\tvalid_1's l1: 1.15508\n",
      "[600]\ttraining's l1: 1.09335\tvalid_1's l1: 1.09264\n",
      "[700]\ttraining's l1: 1.04384\tvalid_1's l1: 1.04305\n",
      "[800]\ttraining's l1: 1.00517\tvalid_1's l1: 1.00428\n",
      "[900]\ttraining's l1: 0.972237\tvalid_1's l1: 0.971312\n",
      "[1000]\ttraining's l1: 0.947867\tvalid_1's l1: 0.946983\n",
      "[1100]\ttraining's l1: 0.926541\tvalid_1's l1: 0.925725\n",
      "[1200]\ttraining's l1: 0.909791\tvalid_1's l1: 0.909021\n",
      "[1300]\ttraining's l1: 0.895548\tvalid_1's l1: 0.894821\n",
      "[1400]\ttraining's l1: 0.88108\tvalid_1's l1: 0.880381\n",
      "[1500]\ttraining's l1: 0.868716\tvalid_1's l1: 0.868037\n",
      "[1600]\ttraining's l1: 0.855959\tvalid_1's l1: 0.855273\n",
      "[1700]\ttraining's l1: 0.84352\tvalid_1's l1: 0.842837\n",
      "[1800]\ttraining's l1: 0.832424\tvalid_1's l1: 0.831771\n",
      "[1900]\ttraining's l1: 0.823317\tvalid_1's l1: 0.822664\n",
      "[2000]\ttraining's l1: 0.814095\tvalid_1's l1: 0.813426\n",
      "[2100]\ttraining's l1: 0.804297\tvalid_1's l1: 0.803626\n",
      "[2200]\ttraining's l1: 0.796377\tvalid_1's l1: 0.795739\n",
      "[2300]\ttraining's l1: 0.789062\tvalid_1's l1: 0.788463\n",
      "[2400]\ttraining's l1: 0.782067\tvalid_1's l1: 0.781473\n",
      "[2500]\ttraining's l1: 0.775743\tvalid_1's l1: 0.775177\n",
      "[2600]\ttraining's l1: 0.769617\tvalid_1's l1: 0.769092\n",
      "[2700]\ttraining's l1: 0.763514\tvalid_1's l1: 0.763008\n",
      "[2800]\ttraining's l1: 0.757408\tvalid_1's l1: 0.756938\n",
      "[2900]\ttraining's l1: 0.75179\tvalid_1's l1: 0.75133\n",
      "[3000]\ttraining's l1: 0.74626\tvalid_1's l1: 0.745852\n",
      "[3100]\ttraining's l1: 0.740224\tvalid_1's l1: 0.739855\n",
      "[3200]\ttraining's l1: 0.735592\tvalid_1's l1: 0.73526\n",
      "[3300]\ttraining's l1: 0.731358\tvalid_1's l1: 0.731047\n",
      "[3400]\ttraining's l1: 0.726802\tvalid_1's l1: 0.726544\n",
      "[3500]\ttraining's l1: 0.723056\tvalid_1's l1: 0.722834\n",
      "[3600]\ttraining's l1: 0.71906\tvalid_1's l1: 0.718866\n",
      "[3700]\ttraining's l1: 0.715184\tvalid_1's l1: 0.715018\n",
      "[3800]\ttraining's l1: 0.711655\tvalid_1's l1: 0.711514\n",
      "[3900]\ttraining's l1: 0.708493\tvalid_1's l1: 0.708362\n",
      "[4000]\ttraining's l1: 0.705169\tvalid_1's l1: 0.705042\n",
      "[4100]\ttraining's l1: 0.701994\tvalid_1's l1: 0.701877\n",
      "[4200]\ttraining's l1: 0.698557\tvalid_1's l1: 0.698463\n",
      "[4300]\ttraining's l1: 0.69537\tvalid_1's l1: 0.695295\n",
      "[4400]\ttraining's l1: 0.691783\tvalid_1's l1: 0.69173\n",
      "[4500]\ttraining's l1: 0.688523\tvalid_1's l1: 0.688495\n",
      "[4600]\ttraining's l1: 0.685362\tvalid_1's l1: 0.685363\n",
      "[4700]\ttraining's l1: 0.682831\tvalid_1's l1: 0.682849\n",
      "[4800]\ttraining's l1: 0.680301\tvalid_1's l1: 0.680328\n",
      "[4900]\ttraining's l1: 0.677582\tvalid_1's l1: 0.67763\n",
      "[5000]\ttraining's l1: 0.674962\tvalid_1's l1: 0.675019\n",
      "[5100]\ttraining's l1: 0.672793\tvalid_1's l1: 0.672846\n",
      "[5200]\ttraining's l1: 0.670431\tvalid_1's l1: 0.670489\n",
      "[5300]\ttraining's l1: 0.668293\tvalid_1's l1: 0.668363\n",
      "[5400]\ttraining's l1: 0.665941\tvalid_1's l1: 0.666021\n",
      "[5500]\ttraining's l1: 0.663933\tvalid_1's l1: 0.664024\n",
      "[5600]\ttraining's l1: 0.661582\tvalid_1's l1: 0.661675\n",
      "[5700]\ttraining's l1: 0.659341\tvalid_1's l1: 0.659446\n",
      "[5800]\ttraining's l1: 0.657152\tvalid_1's l1: 0.657267\n",
      "[5900]\ttraining's l1: 0.655402\tvalid_1's l1: 0.65553\n",
      "[6000]\ttraining's l1: 0.653327\tvalid_1's l1: 0.653465\n",
      "[6100]\ttraining's l1: 0.651335\tvalid_1's l1: 0.651483\n",
      "[6200]\ttraining's l1: 0.64938\tvalid_1's l1: 0.649542\n",
      "[6300]\ttraining's l1: 0.647353\tvalid_1's l1: 0.647523\n",
      "[6400]\ttraining's l1: 0.645278\tvalid_1's l1: 0.645451\n",
      "[6500]\ttraining's l1: 0.643653\tvalid_1's l1: 0.643838\n",
      "[6600]\ttraining's l1: 0.641842\tvalid_1's l1: 0.642032\n",
      "[6700]\ttraining's l1: 0.640295\tvalid_1's l1: 0.640492\n",
      "[6800]\ttraining's l1: 0.638712\tvalid_1's l1: 0.638927\n",
      "[6900]\ttraining's l1: 0.63709\tvalid_1's l1: 0.63731\n",
      "[7000]\ttraining's l1: 0.635229\tvalid_1's l1: 0.635446\n",
      "[7100]\ttraining's l1: 0.633556\tvalid_1's l1: 0.633787\n",
      "[7200]\ttraining's l1: 0.631377\tvalid_1's l1: 0.6316\n",
      "[7300]\ttraining's l1: 0.629808\tvalid_1's l1: 0.630039\n",
      "[7400]\ttraining's l1: 0.628432\tvalid_1's l1: 0.628664\n",
      "[7500]\ttraining's l1: 0.626974\tvalid_1's l1: 0.627209\n",
      "[7600]\ttraining's l1: 0.625676\tvalid_1's l1: 0.625921\n",
      "[7700]\ttraining's l1: 0.624335\tvalid_1's l1: 0.624583\n",
      "[7800]\ttraining's l1: 0.623012\tvalid_1's l1: 0.623275\n",
      "[7900]\ttraining's l1: 0.621563\tvalid_1's l1: 0.621819\n",
      "Did not meet early stopping. Best iteration is:\n",
      "[7941]\ttraining's l1: 0.620982\tvalid_1's l1: 0.621233\n",
      "MSE: 0.9973521931148969\n",
      "Fold 5 finished in 3:09:31.390650\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "   INFO ->  (6036000, 157)\n",
      "   INFO ->  [+]tuning params\n",
      "\u001b[32m[I 2021-10-19 04:49:57,403]\u001b[0m A new study created in memory with name: XgbRegressor\u001b[0m\n",
      "\u001b[32m[I 2021-10-19 04:59:35,872]\u001b[0m Trial 0 finished with value: 0.9687830209732056 and parameters: {'max_depth': 6, 'subsample': 1.0, 'n_estimators': 1900, 'reg_alpha': 12, 'reg_lambda': 44, 'min_child_weight': 13}. Best is trial 0 with value: 0.9687830209732056.\u001b[0m\n",
      "\u001b[32m[I 2021-10-19 05:08:16,665]\u001b[0m Trial 1 finished with value: 0.7082538604736328 and parameters: {'max_depth': 12, 'subsample': 1.0, 'n_estimators': 600, 'reg_alpha': 26, 'reg_lambda': 22, 'min_child_weight': 19}. Best is trial 1 with value: 0.7082538604736328.\u001b[0m\n",
      "   INFO ->  Number of finished trials: 2\n",
      "   INFO ->  Best trial:\n",
      "   INFO ->  \tValue: 0.7082538604736328\n",
      "   INFO ->  \tParams: \n",
      "   INFO ->  \t\tmax_depth: 12\n",
      "   INFO ->  \t\tsubsample: 1.0\n",
      "   INFO ->  \t\tn_estimators: 600\n",
      "   INFO ->  \t\treg_alpha: 26\n",
      "   INFO ->  \t\treg_lambda: 22\n",
      "   INFO ->  \t\tmin_child_weight: 19\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Training on fold 1\n",
      "MSE: 0.6852019429206848\n",
      "Fold 1 finished in 0:11:20.403215\n",
      "Training on fold 2\n",
      "MSE: 0.6889467239379883\n",
      "Fold 2 finished in 0:10:38.923880\n",
      "Training on fold 3\n",
      "MSE: 0.6888421177864075\n",
      "Fold 3 finished in 0:10:39.005315\n",
      "Training on fold 4\n",
      "MSE: 0.6894276142120361\n",
      "Fold 4 finished in 0:10:54.125808\n",
      "Training on fold 5\n",
      "MSE: 0.6887937188148499\n",
      "Fold 5 finished in 0:10:35.058912\n",
      "Training on fold 6\n",
      "MSE: 0.6871293187141418\n",
      "Fold 6 finished in 0:10:31.846935\n",
      "Training on fold 7\n",
      "MSE: 0.6924460530281067\n",
      "Fold 7 finished in 0:10:37.171816\n",
      "Training on fold 8\n",
      "MSE: 0.6901329159736633\n",
      "Fold 8 finished in 0:10:38.116384\n",
      "Training on fold 9\n",
      "MSE: 0.6852853894233704\n",
      "Fold 9 finished in 0:10:26.852317\n",
      "Training on fold 10\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "   INFO ->  Average KFold RMSE: 0.6886181831359863\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "MSE: 0.6899757385253906\n",
      "Fold 10 finished in 0:10:27.058010\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "   INFO ->  feature importance\n",
      "   INFO ->                        feature  fold_1  fold_2  fold_3  fold_4  fold_5  average\n",
      "0     breath_id__u_in__cumsum    6728    6880    6720    6603    7081   6802.4\n",
      "1        breath_id__R__cumsum    6271    6225    6216    6188    6107   6201.4\n",
      "2       breath_id__u_in__mean    5255    5341    5367    5308    5524   5359.0\n",
      "3        breath_id__C__cumsum    5345    5556    5192    5208    5295   5319.2\n",
      "4    breath_id__u_in__diff__2    3951    4075    4012    3909    3945   3978.4\n",
      "..                        ...     ...     ...     ...     ...     ...      ...\n",
      "152    breath_id__R__diff__-7       0       0       0       0       0      0.0\n",
      "153   breath_id__R__diff__-24       0       0       0       0       0      0.0\n",
      "154   breath_id__R__diff__-30       0       0       0       0       0      0.0\n",
      "155     breath_id__R__diff__2       0       0       0       0       0      0.0\n",
      "156     breath_id__C__diff__7       0       0       0       0       0      0.0\n",
      "\n",
      "[157 rows x 7 columns]\n"
     ]
    }
   ],
   "source": [
    "sub = autox.get_submit()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "e8f36152",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T23:16:16.930341Z",
     "start_time": "2021-10-18T23:15:53.217396Z"
    },
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "sub.to_csv(\"autox_1018_kaggle_ventilator_oneclick.csv\", index = False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "cc70220d",
   "metadata": {
    "ExecuteTime": {
     "end_time": "2021-10-18T23:16:32.332530Z",
     "start_time": "2021-10-18T23:16:16.936354Z"
    }
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "  adding: autox_1018_kaggle_ventilator_oneclick.csv (deflated 56%)\n"
     ]
    }
   ],
   "source": [
    "!zip -r autox_1018_kaggle_ventilator_oneclick.csv.zip autox_1018_kaggle_ventilator_oneclick.csv"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e3d537a6",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.10"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": true
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
